<template>
    <van-panel title="HEX设置">
        <van-field v-model="color" clearable label="Hex" placeholder="请输入"/>
        <br>
        <div slot="footer">
            <van-button size="small" @click="setClick">确定</van-button>
        </div>
    </van-panel>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
    computed: {
        ...mapGetters(['backGround']),
        color: {
            get(){
                return this.backGround
            },
            set(val){
                this.$store.dispatch('setBack', val)
            }
        }
    },
    methods: {
        setClick(){
            this.$emit('close')
        }
    }
}
</script>
<style lang="scss" scoped>
section{
    padding: 10px;
}
span{
    font-size: 13px;
    line-height: 50px;
}
</style>
